package 行为型模型.观察者模式;

public class AObserver implements Observer {
    private int mystate;

    @Override
    public void update(Subject subject) {
        mystate=((ASubject)subject).getState();
    }

    public int getMystate() {
        return mystate;
    }

    public void setMystate(int mystate) {
        this.mystate = mystate;
    }
}
